<?php
require_once('db/dba.php');
db_connect();

include "db/db_con.php";
$data=$_POST["data3"];

  $insert= "INSERT INTO hotelbooking (city,CheckIn,CheckOut,class,person,customer_name,phone,email)  VALUES ('".$data["Hcity"]."','".$data["Hclass"]."','".$data['Hdepart']."','".$data['Hreturn']."','".$data['Hroom']."','".$data['Hcustomer']."','".$data['Hphone']."','".$data['Hemail']."')";
query($insert); 
echo  "<font color='green'>You request #". mysql_insert_id()." is sent to vendor</font>";


$subject="Request Id#".mysql_insert_id();



$message="
<p>Dear  ".$data['Hcustomer'].", </p>
<p>This is to your hotel booking request. Below are the details. </p>
<p>Request Number: ".mysql_insert_id()."</p>
<p>Status: Open</p>


<p>Hotel Booking details:</p>
<p>Customer Name:  ".$data['Hcustomer']."</p>
<p>Email:  ".$data['Hemail']."</p>
<p>Phone: ".$data['Hphone']."</p>";

$message.="

<p>Check In Date: ".$data['Hdepart']."</p>
<p>Check Out Date: ".$data['Hreturn']."</p>

";

$message.="
<p>Class:  ".$data['Hclass']."</p>
<p>Person:  ".$data['Hroom']."</p>

<p>Connect to us:</p>
<p>We would like to hear from you.</p>
<p>For any questions, suggestions or comments please contact us at:</p>
<p>Warm regards,</p>

<p>Manish TalwarShree Communications</p>
";


/*
$message="<p>Thank You For Information</p>";


$message .="<p>City:  ".$data['Hcity']."</p>";
$message .="<p>Check In time:  ".$data['Hdepart']."</p>";
$message .="<p>Check Out time:  ".$data['Hreturn']."</p>";
$message .="<p>Hotel Class:  ".$data['Hclass']."</p>";
$message .="<p>Room:  ".$data['Hroom']."</p>";
*/
$headers= "Content-type: text/html\r\n"; 


mail($data["Hemail"], $subject, $message, $headers);
//mail('mail@firstnorthglobal.com', $subject, $message, $headers);

mail('mail@firstnorthglobal.com', $subject, $message, $headers);



?>